package com.cssy.yd.logic.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.byd.acegiext.domain.User;
import com.cssy.yd.logic.dao.LogicMaterialReturnItemDAO;
import com.cssy.yd.logic.entity.LogicFkReturnDO;
import com.cssy.yd.logic.entity.LogicMaterialReturnItemDO;
import com.cssy.yd.logic.service.ILogicMaterialReturnItemService;
import com.plat.exception.SyBaseException;
import com.plat.helper.SearchConditions;
import com.plat.helper.SearchResult;
import com.plat.util.IDCodeTypeUtil;

@Service("logicMaterialReturnItemService")
public class LogicMaterialReturnItemServiceImpl implements ILogicMaterialReturnItemService{

	@Resource(name = "logicMaterialReturnItemDAO")
	private LogicMaterialReturnItemDAO logicMaterialReturnItemDAO;
	@Override
	public SearchResult findListByExample(SearchConditions scs)
			throws SyBaseException {
		SearchResult rs = new SearchResult(scs);
		List<LogicMaterialReturnItemDO> list = logicMaterialReturnItemDAO.find(scs);
		rs.setRecordCount(logicMaterialReturnItemDAO.count(scs));
		rs.setResults(list);
		return rs;
	}

	@Override
	public Integer delete(String id, User user) throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer update(LogicMaterialReturnItemDO t, User user)
			throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public LogicMaterialReturnItemDO save(LogicMaterialReturnItemDO t, User user)
			throws SyBaseException {
		String id = IDCodeTypeUtil.getId();
		t.setId(id);
		logicMaterialReturnItemDAO.insertLogicMaterialReturnItemDO(t);
		return t;
	}

	@Override
	public LogicMaterialReturnItemDO findListById(String id) throws SyBaseException {
		return null;
	}

	@Override
	public List<LogicMaterialReturnItemDO> findByMaReturnid(String mareturnid)
			throws SyBaseException {
		return logicMaterialReturnItemDAO.findByMaReturnid(mareturnid);
	}

	@Override
	public void deleteByMaReturnid(String mareturnid) throws SyBaseException {
		logicMaterialReturnItemDAO.deleteByMaReturnid(mareturnid);
	}

	@Override
	public Integer deleteBizRemoved(String id) throws SyBaseException {
		// TODO Auto-generated method stub
		return null;
	}

}
